package SocialMediaSentiment;

import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;

public class testPerceptronMultiTweet {

	public static void main(String[] args) {
		test();
	}
	
	public static void test(){
		double alpha = 0.01;
		int  sentiment;
		HashMap <String, Integer> tweets = new HashMap<String, Integer>();
		String tweet;
		String file = "Trainset.xls";
		try {
			String[] data;

			HashMap<Integer, String[]> temp = ReadExcel.read(file, 9, 4);
			Iterator<Integer> k = temp.keySet().iterator();
			while(k.hasNext()){
				data = temp.get(k.next());
				tweet = data[0];
				sentiment = Integer.parseInt(data[1]);
				
							
				tweets.put( tweet, sentiment );
			}
		} catch (IOException e) {
			e.printStackTrace();
			System.err.println("Unable to read "+file);
		}
		
		
		Perceptron.PerceptronMultiTweetSentiment(tweets , alpha);
	}

}
